<script lang="ts">
import axios from "axios";
export default {
  name: "NowPlaying",
  data(){
    return {
      films:[]
    }
  },
  mounted() {
    const path = "https://m.maizuo.com/gateway?cityId=110100&pageNum=1&pageSize=10&type="+this.$route.query.type+'&k=4661160';
    axios.get(path,{
      headers:{
        'X-Client-Info':'{"a":"3000","ch":"1002","v":"5.2.1","e":"1761639069258599980892161"}',
        'X-Host':'mall.film-ticket.film.list'
      }
    }).then(value=>{
      this.films = value.data.data.films;
    })
  }
}
</script>

<template>
  <div>
    <ul v-for="item in films" :key="item.filmId">
      <router-link :to="'/detail?filmid='+item.filmId">{{item.name}}</router-link>
      <li><img :src="item.poster" style="width: 200px;"></li>
      <hr/>
    </ul>

  </div>
</template>

<style scoped lang="less">
li{
  list-style: none;
}
</style>
